package topevery.syn.data.model;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import topevery.syn.data.model.codec.ModelTypeEnumCodec;

import java.time.LocalDateTime;

@Data
public class PublicToiletGasData implements IGlbModel {

    @JSONField(name = "a")
    public Long gid;

    @JSONField(name = "b", serializeUsing = ModelTypeEnumCodec.class, deserializeUsing = ModelTypeEnumCodec.class)
    public ModelTypeEnum modelType = ModelTypeEnum.PublicToiletGas;


    @JSONField(name = "v")
    public Long fid;

    /// <summary>
    /// 设备号 YBCS20191201
    /// </summary>
    @JSONField(name = "d")
    public String clientKey;

    @JSONField(name = "f")
    public String clientIp;

    @JSONField(name = "g")
    public Integer clientPort;

    @JSONField(name = "h")
    public LocalDateTime dbCreateDate;
    /// <summary>
    /// 发送时间
    /// </summary>

    @JSONField(name = "i")
    public LocalDateTime clientDate;

    /// <summary>
    /// 设备号 YBCS20191201
    /// </summary>
    //public String ID;
    /// <summary>
    /// 人流量
    /// </summary>
    @JSONField(name = "j")
    public Integer rll;
    /// <summary>
    /// 男厕氨气浓度0.2ppm
    /// </summary>
    @JSONField(name = "k")
    public Double nnh3;
    /// <summary>
    /// 男厕硫化氢浓度0.3ppm
    /// </summary>
    @JSONField(name = "l")
    public Double nh2s;
    /// <summary>
    /// 男厕温度
    /// </summary>
    @JSONField(name = "m")
    public Double nwd;
    /// <summary>
    /// 男厕湿度
    /// </summary>
    @JSONField(name = "n")
    public Double nsd;
    /// <summary>
    ///  女厕氨气浓度0.3ppm
    /// </summary>
    @JSONField(name = "o")
    public Double nvnh3;
    /// <summary>
    /// 女厕硫化氢浓度0.3ppm
    /// </summary>
    @JSONField(name = "p")
    public Double nvnh2s;
    /// <summary>
    /// 女厕温度    21.2摄氏度
    /// </summary>
    @JSONField(name = "r")
    public Double nvwd;

    /// <summary>
    /// 女厕湿度
    /// </summary>
    @JSONField(name = "s")
    public Double nvsd;

    /// <summary>
    /// 用水量
    /// </summary>
    @JSONField(name = "t")
    public Double ysl;

    /// <summary>
    /// 用电量
    /// </summary>
    @JSONField(name = "u")
    public Double ydl;

    /// <summary>
    /// 男厕人流量
    /// </summary>
    @JSONField(name = "x")
    public Integer nrll;

    /// <summary>
    /// 女厕人流量
    /// </summary>
    @JSONField(name = "y")
    public Integer nvrll;


    /// <summary>
    /// 男空位
    /// </summary>
    @JSONField(name = "y1")
    public Integer nkw;
    /// <summary>
    /// 女空位
    /// </summary>
    @JSONField(name = "y2")
    public Integer nvkw;


    //门锁装态 0是开门状态,1是关门状态
    @JSONField(name = "y3")
    public Byte door;

    //男厕(1号) 烟感状态.0正常,1报警
    @JSONField(name = "y4")
    public Byte smoke1;

    //女厕(2号) 烟感状态.0正常,1报警
    @JSONField(name = "y5")
    public Byte smoke2;

    //第三卫生间(3号) 烟感状态.0正常,1报警
    @JSONField(name = "y6")
    public Byte smoke3;

    //4星评价个数
    @JSONField(name = "y7")
    public Integer s4Num;

    //3星评价个数
    @JSONField(name = "y8")
    public Integer s3Num;

    //2星评价个数
    @JSONField(name = "y9")
    public Integer s2Num;

    //1星评价个数
    @JSONField(name = "y10")
    public Integer s1Num;


    //氨气
    @JSONField(name = "y11")
    public Double nh3;
    //硫化氢
    @JSONField(name = "y12")
    public Double h2s;
    //温度
    @JSONField(name = "y13")
    public Double wd;
    //湿度
    @JSONField(name = "y14")
    public Double sd;


    //男厕PM2.5
    @JSONField(name = "y15")
    public Double npm25;
    //女厕PM2.5
    @JSONField(name = "y16")
    public Double nvpm25;
    //男厕光照强度
    @JSONField(name = "y17")
    public Double ngq;

    //女厕光照强度
    @JSONField(name = "y18")
    public Double nvgq;


    //跌倒状态检测,0无人跌倒,1疑似跌倒,2真实跌倒
    @JSONField(name = "y19")
    public Integer fall;

    //男女厕总人流量
    @JSONField(name = "y20")
    public Integer zrll;
    @JSONField(name = "y21")
    //男厕烟感状态.0正常,1报警
    public Integer nbj;
    @JSONField(name = "y22")
    //女厕烟感状态.0正常,1报警
    public Integer nvbj;
    @JSONField(name = "y23")
    //蹲位有人无人数据汇总
    public Integer yrwr;
    @JSONField(name = "y24")
    //各蹲位卷纸有无数据汇总
    public Integer paper;
    @JSONField(name = "y25")
    //男厕擦手纸,,0无,1有
    public Integer ntissue;
    @JSONField(name = "y26")
    //男厕洗手液,0无,1有
    public Integer nsopa;
    @JSONField(name = "y27")
    //女厕擦手纸,0无,1有
    public Integer nvtissue;
    @JSONField(name = "y28")
    //女厕洗手液,0无,1有
    public Integer nvsopa;


    //男厕离开的人流量(现场只安装一个摄像头,只有男厕有人流量数据，就是男女厕总的人数)

    @JSONField(name = "y29")
    public Integer nrll_lk;

    //女厕离开的人流量
    @JSONField(name = "y30")
    public Integer nvrll_lk;

    //男女厕总离开人流量
    @JSONField(name = "y31")
    public Integer zrll_lk;


    //各蹲位卷纸2有无数据汇总(每个蹲位有两卷纸,这是第二卷数有纸无纸据汇总)
    @JSONField(name = "y32")
    public Integer paper2;
    //今日用水量
    @JSONField(name = "y33")
    public Double jrysl;
    //今日用电量
    @JSONField(name = "y34")
    public Double jrydl;

    /**
     * 第三卫生间当前是否报警
     */
    @JSONField(name = "y35")
    public Integer sos;

    /**
     * 男厕烟感状态监测JSON {code:'男01'，ss:0/1,}
     * code:烟感编号
     * ss: 烟感状态.0正常,1报警
     */
    @JSONField(name = "y36")
    public String nsmoke;

    /**
     * 蹲位数据JSON {code:'男01'，mkgs:0/1,}
     * code:蹲位编码
     * mkgs: 使用状态 0,未使用 1，使用中
     * szs1: 纸盒1 0,无纸 1，有纸
     * szs2: 纸盒2 0,无纸 1，有纸
     * in: 进入数
     * out: 离开数
     */
    @JSONField(name = "y37")
    public String nkwd;

    @JSONField(name = "y38")
    public String modelJson;


    /**
     * 女厕蹲位数据JSON {code:'男01'，mkgs:0/1,}
     * code:蹲位编码
     * mkgs: 使用状态 0.0,未使用 1.0，使用中
     * szs1: 纸盒1 0,无纸 1，有纸
     * szs2: 纸盒2 0,无纸 1，有纸
     * in: 进入数
     * out: 离开数
     */
    @JSONField(name = "y39")
    public String nvkwd;

    /**
     * 手纸
     */
    @JSONField(name = "y40")
    public Integer sz;
    /**
     * 洗手液
     */
    @JSONField(name = "y41")
    public Double xsy;

    /**
     * 女厕烟感状态监测JSON {code:'男01'，ss:0/1,}
     * code:烟感编号
     * ss: 烟感状态.0正常,1报警
     */
    @JSONField(name = "y42")
    public String nvsmoke;

    public Integer getRll() {
        if (rll == null) {
            rll = 0;
        }
        return rll;
    }

    public Integer getNrll() {
        if (nrll == null) {
            nrll = 0;
        }
        return nrll;
    }

    public Integer getNvrll() {
        if (nvrll == null) {
            nvrll = 0;
        }
        return nvrll;
    }

    @Override
    public String getGlbModelKey() {
        return clientKey;
    }

    @Override
    public Long getGid() {
        return gid;
    }

    @Override
    public void setGid(Long gid) {
        this.gid = gid;
    }

    @Override
    public ModelTypeEnum getModelType() {
        return modelType;
    }

    @Override
    public void setModelType(ModelTypeEnum modelType) {
        this.modelType = modelType;
    }
}
